/* Statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=145
  Verdict: Accepted
*/
import java.math.*;
import java.util.*;
import java.io.*;
 
public class Main {
 
	public BufferedReader in;
	public StringTokenizer stoken = new StringTokenizer("");
	public PrintWriter out;
 
	public static void main(String[] args) throws IOException {
		new Main();
	}
 
	Main() throws IOException{
		in = new BufferedReader(new FileReader("input.txt")); 
		out = new PrintWriter(new FileWriter("output.txt"));
		BigInteger t = new BigInteger(in.readLine());
		if (t.toString() == "0") out.print(0); else {
			BigInteger one = new BigInteger("1");
			BigInteger two = new BigInteger("2");
			BigInteger l = one;
			BigInteger r = t;
			while (r.compareTo(l) == 1) {
				BigInteger c = l.add(r).divide(two);
				if (c.multiply(c).compareTo(t) == 1) r = c; else l = c.add(one);
			} 
			if (l.multiply(l).compareTo(t) < 1) out.print(l.toString()); else 
				out.print(l.subtract(one).toString());
		}
		out.close(); 
	}
 
	private int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextString());
	}
 
	private String nextString() throws IOException {
		while(!stoken.hasMoreTokens()){
			String st = in.readLine();
			stoken = new StringTokenizer(st);
		}
		return stoken.nextToken();
	}
 
}
